/*
 ******************************
 * Object Oriented Programming in C
 *
 * Author: Laurent Deniau, Laurent.Deniau@cern.ch
 *
 * For more information, please see the paper:
 * http://home.cern.ch/ldeniau/html/oopc/oopc.html
 *
 ******************************
 */

#define IMPLEMENTATION

#include <example.h>

#define BASEIMPL				\
BASEOBJECT_IMPLEMENTATION			\
ENDOF_IMPLEMENTATION				\
BASECLASSIMPL( )

#define BASECLASSIMPL(decl)			\
initClassDecl() { decl; } /* required */	\
dtorDecl() {} /* required */	                \
 						\
ABSTRACTCLASS_IMPLEMENTATION			\
ENDOF_IMPLEMENTATION

#undef  OBJECT
#define OBJECT A

BASEIMPL

#undef  OBJECT
#define OBJECT B

BASEIMPL

#undef  OBJECT
#define OBJECT C

OBJECT_IMPLEMENTATION
  SUPERCLASS(A),
  SUPERCLASS(B)
ENDOF_IMPLEMENTATION

BASECLASSIMPL(initSuper(A);initSuper(B))

#undef  OBJECT
#define OBJECT D

BASEIMPL

#undef  OBJECT
#define OBJECT E

OBJECT_IMPLEMENTATION
  SUPERCLASS(B)
ENDOF_IMPLEMENTATION

BASECLASSIMPL(initSuper(B))

#undef  OBJECT
#define OBJECT F

BASEIMPL

#undef  OBJECT
#define OBJECT G

OBJECT_IMPLEMENTATION
  SUPERCLASS(C)
ENDOF_IMPLEMENTATION

BASECLASSIMPL(initSuper(C))

#undef  OBJECT
#define OBJECT H

OBJECT_IMPLEMENTATION
  SUPERCLASS(D),
  SUPERCLASS(E)
ENDOF_IMPLEMENTATION

BASECLASSIMPL(initSuper(D); initSuper(E))

#undef  OBJECT
#define OBJECT I

BASEIMPL

#undef  OBJECT
#define OBJECT J

OBJECT_IMPLEMENTATION
  SUPERCLASS(F),
  SUPERCLASS(G),
  SUPERCLASS(H),
  SUPERCLASS(I)
ENDOF_IMPLEMENTATION

BASECLASSIMPL(initSuper(F);initSuper(G);initSuper(H);initSuper(I))

#undef  OBJECT
#define OBJECT K

OBJECT_IMPLEMENTATION
  SUPERCLASS(J)
ENDOF_IMPLEMENTATION

initClassDecl() { initSuper(J); } /* required */
dtorDecl() {} /* required */

CLASS_IMPLEMENTATION
ENDOF_IMPLEMENTATION
